/*
 * Copyright (c) 2010-2013 Ruben Chakhmakhchyan. All rights reserved.
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Eclipse Public License
 * Version 1.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://opensource.org/licenses/EPL-1.0 and read it before using this file.
 */

#pragma once

#include "commontypes.h"
#include "pdf_obj.h"
#include "pdf_stream.h"

#include "list.h"


class PdfStream;

class PdfDocument
{
public:

    PdfDocument();
    PdfDocument( wchar_t* filename );

    void addImage( PdfImage* image );

    void save( PdfStream& stream );

    PdfObject* getStockObject( PdfObject::Type type );

    PdfPages& getPages() { return m_objPages; }

    void generateIds();

    uint_t getTotalCount();

private:

    PdfCatalog m_objCatalog;
    PdfPages m_objPages;

    List<PdfImage*> m_images;

    wchar_t* m_filename;
    bool m_autoSave;
    PdfFileStream* m_fileStream;
};

